#define _CRT_SECURE_NO_WARNINGS

#include"list.h"


void listTest()
{
	SListNode* plist = NULL;

	SListPushBack(plist, 1);
	SListPushBack(plist, 2);
	SListPushBack(plist, 3);
	SListPushBack(plist, 4);

	SListPrint(plist);

	SListPushFront(&plist, 1);
	SListPushFront(&plist, 2);
	SListPushFront(&plist, 3);
	SListPushFront(&plist, 4);

	SListPrint(plist);

	//SListPopFront(&plist);
	//SListPopFront(&plist);
	//SListPopFront(&plist);
	//SListPopFront(&plist);
	//SListPopFront(&plist);
	//SListPopFront(&plist);
	//SListPopFront(&plist);
	//SListPopFront(&plist);

	//SListPopBack(&plist);
	//SListPopBack(&plist);
	//SListPopBack(&plist);
	//SListPopBack(&plist);
	//SListPopBack(&plist);
	//SListPopBack(&plist);
	//SListPopBack(&plist);
	//SListPopBack(&plist);

	SListInsertAfter(plist->next,210);
	SListPrint(plist);

	SListErasetAfter(plist->next->next);
	SListErasetAfter(plist->next->next);
	SListErasetAfter(plist->next->next);
	SListErasetAfter(plist->next->next);
	SListErasetAfter(plist->next->next);
	SListPrint(plist);
	SListErasetAfter(plist->next);
	SListPrint(plist);
	SListErasetAfter(plist->next);
	SListErasetAfter(plist);
	SListErasetAfter(plist);

	SListPrint(plist);


	SListDestroy(&plist);
}


int main()
{
	listTest();


	
	return 0;
}